package ar.pegasus.clasificador.entidades;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="Sinonimo")
@Inheritance(strategy=javax.persistence.InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="Tipo",discriminatorType=DiscriminatorType.STRING)
public abstract class Sinonimo implements ElementoAplicacion {
	private static final long serialVersionUID = 8445809197021096740L;

	private int idSinonimo;
	private Seccion seccion;
	private String sinonimo;
	
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
	public int getIdSinonimo() {
		return idSinonimo;
	}
	public void setIdSinonimo(int idSinonimo) {
		this.idSinonimo = idSinonimo;
	}
	
	@ManyToOne
	@JoinColumn(name="F_IdSeccion", nullable=false)
	public Seccion getSeccion() {
		return seccion;
	}
	public void setSeccion(Seccion seccion) {
		this.seccion = seccion;
	}
	
	@Column(name="Sinonimo", nullable = false)
	public String getSinonimo() {
		return sinonimo;
	}
	public void setSinonimo(String sinonimo) {
		this.sinonimo = sinonimo;
	}
	
}
